/**
 * Created with IntelliJ IDEA
 * Description  二叉树测试
 * User: 王杰
 * Date: 2025-06-03
 * Time: 17:29
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        BinaryTree.TreeNode root = binaryTree.createTree();

        binaryTree.preOrder(root);
        System.out.println();

        binaryTree.inOrder(root);
        System.out.println();

        binaryTree.postOrder(root);
        System.out.println();

        binaryTree.size(root);
        System.out.println(BinaryTree.nodeSize);

        binaryTree.getLeafNodeCount(root);
        System.out.println(BinaryTree.leafNodeCount);

        System.out.println(binaryTree.getLeafNodeCount2(root));

        System.out.println(binaryTree.getKLevelNodeCount(root, 3));

        System.out.println(binaryTree.getHeight(root));

        binaryTree.find(root, 'D');

        System.out.println(BinaryTree.findNode.val);

        System.out.println(binaryTree.isCompleteTree(root));


    }
}
